package com.black.web.controller.my.shoppingcar;

import com.black.app.domain.req.my.myshoppingcar.AppShoppingCarQueryReq;
import com.black.app.domain.resp.my.myshoppingcar.AppShoppingCarResp;
import com.black.app.service.store.AppStoreShoppingCartService;
import com.black.common.core.controller.BaseController;
import com.black.common.core.domain.R;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "后台-我的购物车相关Api")
@RestController
@RequestMapping("/admin/my/shoppingCar")
public class ShoppingCarController extends BaseController {
    @Autowired
    private AppStoreShoppingCartService shoppingCartService;

    @PreAuthorize("@ss.hasPermi('my:shoppingcar:list')")
    @ApiOperation(value = "购物车列表")
    @GetMapping(value = "/list")
    public R<PageInfo<AppShoppingCarResp>> list(AppShoppingCarQueryReq req){
        PageInfo<AppShoppingCarResp> page = this.shoppingCartService.paginationQuery(req);
        return R.ok(page);
    }
}
